
Imports Microsoft.VisualBasic
Imports System.Web
Imports System.Web.UI
Namespace Spry
    Public Class ucSpryTabPanel
        Inherits Control
        Dim _tabPanelId As String
        Dim _tabInicial As Integer = 0
        Public Property tabPanelId() As String
            Get
                Return _tabPanelId
            End Get
            Set(ByVal value As String)
                _tabPanelId = value
            End Set
        End Property
        Public Property tabInicial() As Integer
            Get
                Return _tabInicial
            End Get
            Set(ByVal value As Integer)
                _tabInicial = value
            End Set
        End Property

        Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)
            With writer
                .Write("<!--Control Manejador de TabPanels-->")
                .RenderBeginTag(HtmlTextWriterTag.Script)
                .Write(String.Format("var TabbedPanels1 = new Spry.Widget.TabbedPanels(""{0}"");{1}", _tabPanelId, .NewLine))
                .Write(String.Format("TabbedPanels1.showPanel({0});", _tabInicial, .NewLine))
                .RenderEndTag()
            End With


        End Sub

    End Class
End Namespace